<script setup lang="ts">
import Top from './component/Top.vue'
import Menu from './component/Menu.vue'
import {ref,onMounted} from 'vue'
let path = location.pathname;
const isLogin = ref()
//?判断是否在登录页面
onMounted(()=>
{
     if(path == "/login")
     {
          isLogin.value = true
     }else
     {
          isLogin.value = false
     }
})
</script>
<template>
     <RouterView v-if="isLogin" />
     <div class="common-layout" v-else>
          <el-container>
               <el-header><Top></Top></el-header>
               <el-container>
                    <el-aside width="200px" style="z-index: 0;"><Menu></Menu></el-aside>
                    <el-container >
                         <el-main class="elmain">
                               <RouterView />
                         </el-main>
                    </el-container>
               </el-container>
          </el-container>
     </div>
</template>

<style scoped>
.elmain{
     height: 92vh;
     overflow-y: scroll;
}
.common-layout{
     position: relative;
     z-index: 0;
}
.el-header{
     --el-header-padding:0px
}
.el-container{
     --el-header-padding:0px
}
#nprogress .bar {
     background: blue !important;
     height: 5000px !important;
}
</style>
